#include<stdio.h>
int main()
{
    char n;
    while(scanf("%c",&n)==1)
    {
        
        if(n>='a'&&n<='z')
            printf("%c\n",n-32);
        else if(n>='A'&&n<='Z')
            printf("%c\n",n+32);
    }
    return 0;
}
